$(document).ready(function(){
	$("#deviceId").live("change", function(){
		var id = $(this).val();
		if(id != 0){
			$.ajax({
				dataType: "json",
				url: "InformationDeviceServlet",
				data: {deviceId: id},
				success: function(data){
					$('#clientId').val(data.clientId);
					$('#servicemanId').val(data.servicemanId);
					$('#type').val(data.type);
					$('#desc').val(data.desc);
				}
			});
		} else {
			$('#clientId').val("");
			$('#servicemanId').val("");
			$('#type').val("");
			$('#desc').val("");
			
		}
	});	

});
